﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using l1cs.server.model.Instance;

namespace l1cs.server.serverpackets
{
    public class S_Teleport : ServerBasePacket
    {
        private static Logger _log = Logger.getLogger( typeof( S_Teleport ).FullName );
 
        private byte[] _byte = null;

        public S_Teleport( L1PcInstance pc )
        {
            writeC( Opcodes.S_OPCODE_TELEPORT );
            writeC( 0x00 );
            writeC( 0x40 );
            writeD( pc.getId() );
        }

        override
        public byte[] getContent()
        {
            if ( _byte == null )
            {
                _byte = getBytes();
            }
            return _byte;
        }

        override
        public String getType()
        {
            return "[S] S_Teleport";
        }
    }
}